﻿
namespace System.Erp.Runtime
{
    /// <summary>
    /// 定义了一个Attribute基类，继承此Attribute的类能够返回零件定义
    /// </summary>
    [
    Serializable,
    AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct,AllowMultiple=true)
    ]
    public abstract class PartProviderAttribute : Attribute
    {
        /// <summary>
        /// 返回此Attribute能够提供的零件
        /// </summary>
        /// <param name="reflectedSource">此Attribute引用的源</param>
        /// <returns>零件对象</returns>
        public abstract IPart CreatePart(AttributeReflectedSource reflectedSource);
    }
}
